<!--
  @author mujunlin
  @since 2019/10/17 16:34
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{type:'checkbox',field:'weightId', unresize:true, align:'center', fixed:'left'}"></th>
        <th lay-data="{field:'plat', width:100, unresize:true, align:'center'}">服务平台</th>
        <th lay-data="{field:'companyName', unresize:true, align:'center'}">服务商</th>
        <th lay-data="{field:'cityName', width:100, unresize:true, align:'center'}">城市</th>
        <th lay-data="{field:'autoStatusNew', width:120, unresize:true, align:'center'}">新单自动派单</th>
        <th lay-data="{field:'autoStatusRework', width:120, unresize:true, align:'center'}">返修自动派单</th>
        <th lay-data="{field:'autoTimeStart', width:120, unresize:true, align:'center'}">自动派单时间</th>
        <th lay-data="{field:'updateTime', width:230, unresize:true, align:'center'}">最近修改人/时间</th>
        <th lay-data="{field:'true', unresize:true, align:'center', width:80, fixed:'right', toolbar: '#tableBar'}">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${items}">
        <td th:text="${item.weightId}"></td>
        <td th:switch="${item.plat}">
            <div th:each="plat:${platList}"
                 th:text="${plat.value}"
                 th:if="${item.plat == plat.key}">
            </div>
        </td>
        <td th:text="${item.companyName}"></td>
        <td th:text="${item.cityName}"></td>
        <td th:switch="${item.autoStatusNew}">
            <div th:each="autoStatus:${autoStatusSet}">
                <span
                        th:case="${autoStatus.getCode()}"
                        th:text="${autoStatus.getName()}"
                        th:class="${T(com.zmn.oms.common.constant.ConfOrderEnum.AutoStatusEnum).AUTO_STATUS_FORBIDDEN.getCode() == autoStatus.getCode()?'layui-badge layui-bg-gray' : 'layui-badge layui-bg-green'}"
                        style="height: 20px;line-height: 20px;">
                </span>
            </div>
        </td>
        <td th:switch="${item.autoStatusRework}">
            <div th:each="reworkStatus:${reworkStatusSet}">
                <span
                        th:case="${reworkStatus.getCode()}"
                        th:text="${reworkStatus.getName()}"
                        th:class="${T(com.zmn.oms.common.constant.ConfOrderEnum.ReworkStatusEnum).REWORK_STATUS_FORBIDDEN.getCode() == reworkStatus.getCode()?'layui-badge layui-bg-gray' : 'layui-badge layui-bg-green'}"
                        style="height: 20px;line-height: 20px;">
                </span>
            </div>
        </td>
        <td th:text="${item.autoTimeStart + ' ~ ' + item.autoTimeEnd}"></td>
        <td th:text="${(item.updater != null ? item.updater+'/' : '')+T(com.zmn.common.utils.date.DateUtil).toString(item.updateTime)}">updateTime</td>
        <td></td>
    </tr>
    </tbody>
</table>